Repository navigation
fix(bootstrap): check warns instead of failing on missing op when restore was skipped - #13067
Merged
Merged
Conversation
…tore was skipped The check phase required a working 1Password CLI even on seats that ran with --skip restore, but op is restored from ~/tools in the restore phase, so a non-muse seat that skipped restore could never pass check (#13048, first seen on the grok seat). When restore is out of scope for the run (--skip restore, or --only without restore), the op leg now logs a warning and does not fail the check; the hard failure stays when restore was in scope. Adds scripts/tests/test_muse_bootstrap_check_op.py covering both branches against the real script with fake fleet/restic/bws binaries and a fake CONNECT proxy for the laptop-agent leg, and wires it into scripts-test.yml.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #13048 — this change implements that issue's suggested fix in full, and the PR is intended to close it on merge.
Problem
scripts/muse/bootstrap.sh's check phase hard-failed (rc=1) whenever the 1Password CLI did not verify — including on seats that ran with--skip restore,persist,init, whereopis intentionally absent because it is restored from~/toolsin the restore phase. First seen on the grok seat: every fleet leg passed, the check still failed on the missingopalone.Change
scripts/muse/bootstrap.sh: the op leg gains a middle branch — when restore is out of scope for the run (want restoreis false:--skip restore, or--onlywithout restore), an unverifiedoplogs a warning ("…not verified, but the restore phase was skipped, so op is not expected on this seat yet (warning only)") and does not setrc=1. When restore was in scope, the hard failure is unchanged.scripts/tests/test_muse_bootstrap_check_op.py(new): behavior tests running the real script in a throwaway HOME with fakefleet/restic/bwsbinaries and a fake CONNECT proxy for the laptop-agent leg, staging the exact grok-seat shape (service-account token present,opCLI absent):.github/workflows/scripts-test.yml: new step running the new test file, following the file's existing per-suite pattern.Verification
python3 -m unittest discover -s scripts/tests -p 'test_muse_bootstrap_check_op.py' -v→ 2 passed (also clean under-W error::ResourceWarning).test_muse_bootstrap_tokens.py→ 3 passed.bash -n scripts/muse/bootstrap.shclean.Fixes #13048
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.